package asia.lxq.cic.dao;

import asia.lxq.cic.entity.Area;
import asia.lxq.cic.entity.College;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AreaMapper {

    @Select("select * from area where parent_id=0")
    List<Area> selectProvince();
    @Select("select name from area where area_id=#{areaId}")
    String selectOneArea(int areaId);
    @Select("select * from area where parent_id=#{parentId}")
    List<Area> selectArea(int parentId);

    @Select("select * from college where college_area=#{area}")
    List<College> selectCollege(String area);

    @Select("select * from college where college_id=#{collegeId}")
    College selectCollegeByCollegeId(int collegeId);
}
